<template>
  <select name="123" id="abc" v-model="selected" @change="SelectBtn()">
    <option v-for="(item,index) in statusArr" :key="index" :value="item.statusId">
      {{item.statusVal}}
    </option>
  </select>
</template>

<script lang="ts">
import { defineComponent } from "vue";

export default defineComponent({
  name: "YuiSelect",
  data() {
    return {
      name: "",
      selected: 0,
      statusArr: [
        {
          statusId: "0",
          statusVal: "请选择",
        },
        {
          statusId: "1",
          statusVal: "未处理",
        },
        {
          statusId: "2",
          statusVal: "处理中",
        },
        {
          statusId: "3",
          statusVal: "处理完成",
        },
      ],
    };
  },
  props: {

  },
  methods: {
    SelectBtn() {
      console.log(this.selected)
      this.$emit("selectdata", this.selected);
    },
  },
});
</script>